package com.nciae.chain;

import com.nciae.chain.handler.security.QHandler;
import com.nciae.po.SecurityQuestion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SecurityQuestionChain {

    @Autowired
    private List<QHandler> handlers;


   public void service(SecurityQuestion securityQuestion, int option) {
        for(QHandler handler : handlers) {
            handler.service(securityQuestion, option);
        }
    }
}
